<template>
  <div>
    <p>这个页面是测试页面</p>
    <router-link to="/test/child1"> child1 vue </router-link>
    <br>
    <router-link to="/test/child2"> child2 vue </router-link>
    <br>
    <button color="primary" @click="showMessage">按钮{{ $route.params.id }}</button>
    <div>
      <p>子vue显示的地方</p>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
  import {mapGetters} from 'vuex'

  export default{
    computed: {
      ...mapGetters({
        testvar: 'getMsg'
      })
    },
    methods: {
      showMessage: function () {
        var self = this

      }
    }
  }
</script>
